<?php $this->load->view('left'); ?>
<script type="text/javascript">
var pwd;
var repwd;
function check_admin(){
	if($("#usrname").val()=="")
		{
		$("#usrname").focus();
		return false;
		}	
	pwd=$("#pwd").val();
	repwd=$("#re_pwd").val();
	if(pwd!='')
	{
		if(pwd!=repwd)
		{
			$("#showresult").html("<font color=red >Password is not the same</font>");
			return false;
			}
		else
		{
			return true;
			}
	}
	else
	{
		$("#showresult").html("<font color=red >Password can not be empty!</font>");
		return false;
	}
}
</script>
<h2>Add Upload Administrator</h2>
<br />
<br />
<br />
<br />
<p id="showresult"></p>
<form method="post" action="<?php echo site_url('welcome/insert_admin');?>">
<table>
  <tr>
    <td>Username:</td>
    <td><input type="text" name="usrname" id="usrname" /></td>
  </tr>
  <tr>
    <td>Password</td>
    <td><input type="password" name="pwd" id="pwd" /></td>
  </tr>
  <tr>
    <td>Password confirmation:</td>
    <td><input type="password" name="re_pwd" id="re_pwd" /></td>
  </tr>
  <tr>
    <td><input type="submit" name="submit" id="submit" value="ADD" onclick="return check_admin()"/></td>
    <td><input type="reset" name="reset" id="reset" value="RESET" /></td>
  </tr>
</table>
</form>
<?php $this->load->view('right'); ?>
